#include <iostream>

class Person
{
public:
    Person()
    {
        std::cout << "无参构造" << std::endl;
    }
    void run()
    {
        std::cout << "run\n";
    }

public:
    int m_age;
};
int main()
{
    const char *str = "hello world";
    // char *buffer = (char *)str;

    /*将const转化成非const*/
    char *buffer = const_cast<char *>(str);
    std::cout << buffer << std::endl;

    /*复合数据类型*/
    const Person *p1 = new Person();
    // Person *p2 = (Person *)p1;
    Person *p2 = const_cast<Person *>(p1);
    p2->run();
    return 0;
}